<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:include="common::common(title='基础数据')">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" ></meta>
</head>
<script type="text/javascript" th:src="@{/js/basic/scheduleJobLog.js}"></script>
<body>
<div id="app">
  <el-container style="margin-top:10px;">
	<el-header>
	    	<el-form ref="form" :model="queryData" label-width="80px">
		    	<el-row :gutter="20">
				  <el-col :span="6">
				  		<el-form-item label="bean名称">
					  		<el-input v-model="queryData.beanName" clearable>
							</el-input>
						</el-form-item>
				  </el-col>
				  <el-col :span="12">
				  		<el-form-item label="时间">
					  		    <el-date-picker
							      v-model="dateRange"
							      type="datetimerange"
							      range-separator="至"
							      start-placeholder="开始日期"
							      end-placeholder="结束日期"
							      value-format="yyyy-MM-dd HH:mm:ss"
							      >
							    </el-date-picker>
						</el-form-item>
				  </el-col>
				  <el-col :span="6">
				  	<el-button type="primary" icon="el-icon-search" @click="query">查询</el-button>
				  </el-col>
				</el-row>
	    	</el-form>
	    </el-header>
	    <el-main style="padding:5px;">
	    	<div style="margin:10px;">
	    	  <el-table  
	    	    ref="scheduleJobLogDatagrid" 
	    	    :data="datagrid"
			    tooltip-effect="dark"
			    style="width: 100%;"
			    max-height="300"
			    @row-click="datagridSelect"
			    border
			    highlight-current-row
			    >
			    <el-table-column type="index" width="50"></el-table-column>
			    <el-table-column prop="id" label="ID" width="80"> </el-table-column>
			    <el-table-column prop="jobId" label="任务id"> </el-table-column>
			    <el-table-column prop="beanName" label="bean名称"> </el-table-column>
			    <el-table-column prop="methodName" label="方法名"> </el-table-column>
			    <el-table-column prop="params" label="参数"> </el-table-column>
			    <el-table-column prop="status" label="任务状态 ">
			    	<template slot-scope="scope">
			   			<el-tag size="medium" type="formatterStatusType(scope.row)">{{ formatterStatus(scope.row) }}</el-tag>
			   		</template>
			    </el-table-column>
			    <el-table-column prop="error" label="失败信息"> </el-table-column>
			    <el-table-column prop="times" label="耗时(毫秒)"> </el-table-column>
			    <el-table-column prop="createTime" label="创建时间"> </el-table-column>
			  </el-table>
			</div>
			<div style="margin:10px">
			    <el-pagination
			      :current-page="queryData.page"
			      :page-sizes="[10, 20, 40, 100]"
			      :page-size="queryData.rows"
			      layout="total, sizes, prev, pager, next, jumper"
			      :total="totalNum"
			      @size-change="handleSizeChange"
			      @current-change="handleCurrentChange"
			      @prev-click="handlePrevClick"
			      @next-click="handleNextClick">
			    </el-pagination>
			 </div>
	    </el-main>
	</el-container>
</div>
</body>
</html>